package com.example.camera;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;

public class PhotoDetailActivity extends AppCompatActivity {
    private ImageView imageView;
    private TextView textView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_photo_detail);


        imageView = findViewById(R.id.imageView2);
        textView = findViewById(R.id.textView2);


        Intent intent = getIntent();
        PhotoInfo photoInfo = intent.getParcelableExtra("photo_info");


        imageView.setImageBitmap(photoInfo.getImage());
        String info = "Time: " + photoInfo.getFormattedTime() + "\nLatitude: " + photoInfo.getLatitude() + "\nLongitude: " + photoInfo.getLongitude();
        textView.setText(info);

    }
}